//
//  RDNetworkMediator.h
//  RDelivery
//
//  Created by selmerzhang on 2021/8/9.
//  Copyright © 2021 Tencent. All rights reserved.
//

#ifndef RDNetworkMediator_h
#define RDNetworkMediator_h

#import <RaftInterface/RAFTNetworkProtocol.h>

NS_ASSUME_NONNULL_BEGIN

@interface RDNetworkMediator : NSObject

/// 根据注入初始化中间层
/// @param netImpl 实现了RAFTNetworkProtocol协议的实例
- (instancetype)initWithImpl:(id<RAFTNetworkProtocol>)netImpl;

/// 发送HTTP请求
/// @param request 请求体
/// @param completedBlock 完成的回调
- (void)sendRequest:(id<RAFTHttpRequestProtocol>)request
          completed:(nullable RAFTRequestCompletedBlock)completedBlock;

@end

NS_ASSUME_NONNULL_END

#endif /* RDNetworkMediator_h */
